package com.digitalchina.lxnsy.activity.management;

import android.os.Bundle;
import android.widget.TextView;

import com.digitalchina.lxnsy.R;
import com.digitalchina.lxnsy.base.BaseActivity;
import com.digitalchina.lxnsy.entity.ProductVO;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * ================================================
 * 项目名称：BigData
 * 类描述：
 * 包名：com.digitalchina.bigdata.activity.management
 * 创建人：郑皓
 * 创建时间：2019/4/26 14:21
 * 修改备注：
 * ================================================
 */
public class ProductionForecastResultActivity extends BaseActivity {

    @Bind(R.id.tv_date)
    TextView tvDate;
    @Bind(R.id.tv_name)
    TextView tvName;
    @Bind(R.id.tv_variety)
    TextView tvVariety;
    @Bind(R.id.tv_weight_unit)
    TextView tvWeightUnit;
    @Bind(R.id.tv_weight)
    TextView tvWeight;
    @Bind(R.id.tv_seed_dosage)
    TextView tvSeedDosage;
    @Bind(R.id.tv_type_fertilizer)
    TextView tvTypeFertilizer;
    @Bind(R.id.tv_fertilizer_dosage)
    TextView tvFertilizerDosage;
    @Bind(R.id.tv_type_pesticide)
    TextView tvTypePesticide;
    @Bind(R.id.tv_pesticide_dosage)
    TextView tvPesticideDosage;
    @Bind(R.id.tv_type_fertilizer2)
    TextView tvTypeFertilizer2;
    @Bind(R.id.tv_fertilizer_inventory)
    TextView tvFertilizerInventory;
    @Bind(R.id.tv_type_pesticide2)
    TextView tvTypePesticide2;
    @Bind(R.id.tv_pesticide_inventory)
    TextView tvPesticideInventory;

    private ProductVO vo;

    @Override
    public void setLayout() {
        setContentLayout(R.layout.activity_production_forecast_result);
        setTitle("预测结果");
    }

    @Override
    public void initMember() {
        vo = (ProductVO) getIntent().getSerializableExtra("ProductVO");

        if(vo!=null){
            tvDate.setText(vo.getDate());
            tvName.setText(vo.getCropname());
            tvVariety.setText(vo.getBreedname());
            tvWeightUnit.setText(vo.getUnit());
            tvWeight.setText(vo.getWeight());
            tvSeedDosage.setText(vo.getFeednumber()+"");
            tvTypeFertilizer.setText(vo.getChemicalname());
            tvFertilizerDosage.setText(vo.getChemicalnumber()+"");
            tvTypePesticide.setText(vo.getPesticidename());
            tvPesticideDosage.setText(vo.getChemicalnumber()+"");

            // 库存量
            tvTypeFertilizer2.setText(vo.getChemicalname());
            tvFertilizerInventory.setText(vo.getChemicalreserve()+"");
            tvTypePesticide2.setText(vo.getPesticidename());
            tvPesticideInventory.setText(vo.getPesticidereserve()+"");
        }

    }

    @Override
    public void addListener() {

    }

    @Override
    public void setHandler() {

    }

    @Override
    public void callBack(Object object) {

    }

    @Override
    public void rightOnClick() {

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }
}
